package com.input4hua.interpreter;

import java.util.Stack;

/**
 * Created by jiahua.hu on 2019/3/2.
 */
public class Client {

    private String expr;

    public Client(String expr) {
        this.expr = expr;
    }

    public void calc(Context ctx) {
        //对表达式存储
        Stack<Expression> stack = new Stack<>();

        char[] chars = expr.toCharArray();

        for (int i = 0; i < chars.length; i++) {
            //处理具体表达式 expr,并将翻译的表达式存储进stack
        }

        Expression exp = stack.pop();

        exp.interpreter(ctx);
    }
}
